<%--
  Created by IntelliJ IDEA.
  User: whb
  Date: 2024/1/24
  Time: 11:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" language="java" %>
<html>
<head>
  <title>Title</title>
</head>
<body>
<span style="color:yellow">${ERROR}</span>
<form action="../user_login" method="post">
  账号：<input type="text" name="name"/><br/>
  密码：<input type="password" name="password"/><br/>
  验证码：
  <input type="text" name="code" style="width: 120px"/>
  <img src="../user_login_code" onclick="changeCode()" id="code"/>
  <br/>
  <button>登陆</button>
</form>
</body>
</html>
<script>
  function changeCode() {
    document.getElementById('code').src = '../user_login_code?number=' + Math.floor(Math.random() * 10000);
  }
</script>